package hrhq.cntvcn.service;

import java.io.IOException;

import org.apache.solr.client.solrj.SolrServerException;

import hrhq.cntvcn.pojo.HrhqImage;
import hrhq.cntvcn.pojo.SearchResult;

/**
 * 检索图集业务层接口
 * @author Administrator
 *
 */
public interface SearchImageService {
	/**
	 * 根据图集id添加索引
	 * @param ids 一组图集id
	 * 执行更新索引时只需id相同进行覆盖
	 */
	public void addIndexById(String... ids);
	/**
	 * 清空索引
	 */
	public void deleteAllIndex();
	/**
	 * 根据查询删除索引
	 * @param query 查询语法
	 * @throws IOException 
	 * @throws SolrServerException 
	 */
	public void deleteIndexByQuery(String query) throws SolrServerException, IOException;
	/**
	 * 根据图集标题检索图集信息
	 * @param title 图集标题
	 * @throws SolrServerException 
	 */
	public SearchResult<HrhqImage> searchByImageTitle(String titleKey,Integer rows,Integer currPage) throws SolrServerException;
	/**
	 * 根据图集摘要检索图集信息
	 * @param remark 图集摘要
	 * @throws SolrServerException 
	 */
	public SearchResult<HrhqImage> searchByImageRemark(String remarkKey,Integer rows,Integer currPage) throws SolrServerException;
	/**
	 * 自定义检索
	 * @param DIYquery 自定义检索语法
	 * @param isHighlight 是否高亮处理
	 * @param 每页显示数量
	 * @throws SolrServerException 
	 */
	public SearchResult<HrhqImage> searchByQuery(String DIYquery,Boolean isHighlight,Integer rows,Integer currPage) throws SolrServerException;
}
